package nav

/*
#include<stdint.h>
#include<stdbool.h>
extern void nav_duFileIO_Delete(void * c_this);
extern bool nav_duFileIO_isReading(void * c_this);
extern bool nav_duFileIO_isWriting(void * c_this);
extern bool nav_duFileIO_read(void * c_this,void * ptr,unsigned long long size);
extern bool nav_duFileIO_write(void * c_this,void * ptr,unsigned long long size);
extern bool nav_duDumpCompactHeightfield(void * chf,void * io);
extern bool nav_duDumpContourSet(void * cset,void * io);
extern bool nav_duDumpPolyMeshDetailToObj(void * dmesh,void * io);
extern bool nav_duDumpPolyMeshToObj(void * pmesh,void * io);
extern void nav_duLogBuildTimes(void * ctx,int totalTileUsec);
extern bool nav_duReadCompactHeightfield(void * chf,void * io);
extern bool nav_duReadContourSet(void * cset,void * io);

*/
import "C"
import "unsafe"
import "gitee.com/hasika/cgo"

var _ unsafe.Pointer
var _ cgo.NotUsed

type DuFileIOPtr uintptr

/*
public virtual void Delete()
*/
func (p DuFileIOPtr) Delete() {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	C.nav_duFileIO_Delete(wrap_this)
}

/*
public virtual bool isReading() const = 0
*/
func (p DuFileIOPtr) IsReading() bool {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_duFileIO_isReading(wrap_this)
	go_out := bool(wrap_out)
	return go_out
}

/*
public virtual bool isWriting() const = 0
*/
func (p DuFileIOPtr) IsWriting() bool {
	var wrap_this unsafe.Pointer
	wrap_this = unsafe.Pointer(p)
	wrap_out := C.nav_duFileIO_isWriting(wrap_this)
	go_out := bool(wrap_out)
	return go_out
}

/*
public virtual bool read(void * ptr, size_t const size) = 0
*/
func (p DuFileIOPtr) Read(ptr uintptr, size uint64) bool {
	var wrap_this unsafe.Pointer
	var wrap_arg_ptr unsafe.Pointer
	var wrap_arg_size C.ulonglong
	wrap_this = unsafe.Pointer(p)
	wrap_arg_ptr = (unsafe.Pointer)(ptr)
	wrap_arg_size = (C.ulonglong)(size)
	wrap_out := C.nav_duFileIO_read(wrap_this, wrap_arg_ptr, wrap_arg_size)
	go_out := bool(wrap_out)
	return go_out
}

/*
public virtual bool write(void const * ptr, size_t const size) = 0
*/
func (p DuFileIOPtr) Write(ptr uintptr, size uint64) bool {
	var wrap_this unsafe.Pointer
	var wrap_arg_ptr unsafe.Pointer
	var wrap_arg_size C.ulonglong
	wrap_this = unsafe.Pointer(p)
	wrap_arg_ptr = (unsafe.Pointer)(ptr)
	wrap_arg_size = (C.ulonglong)(size)
	wrap_out := C.nav_duFileIO_write(wrap_this, wrap_arg_ptr, wrap_arg_size)
	go_out := bool(wrap_out)
	return go_out
}

/*
bool duDumpCompactHeightfield(rcCompactHeightfield& chf, duFileIO * io)
*/
func DuDumpCompactHeightfield(chf RcCompactHeightfieldPtr, io DuFileIOPtr) bool {
	var wrap_arg_chf unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_chf = (unsafe.Pointer)(chf)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duDumpCompactHeightfield(wrap_arg_chf, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}

/*
bool duDumpContourSet(rcContourSet& cset, duFileIO * io)
*/
func DuDumpContourSet(cset RcContourSetPtr, io DuFileIOPtr) bool {
	var wrap_arg_cset unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_cset = (unsafe.Pointer)(cset)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duDumpContourSet(wrap_arg_cset, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}

/*
bool duDumpPolyMeshDetailToObj(rcPolyMeshDetail& dmesh, duFileIO * io)
*/
func DuDumpPolyMeshDetailToObj(dmesh RcPolyMeshDetailPtr, io DuFileIOPtr) bool {
	var wrap_arg_dmesh unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_dmesh = (unsafe.Pointer)(dmesh)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duDumpPolyMeshDetailToObj(wrap_arg_dmesh, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}

/*
bool duDumpPolyMeshToObj(rcPolyMesh& pmesh, duFileIO * io)
*/
func DuDumpPolyMeshToObj(pmesh RcPolyMeshPtr, io DuFileIOPtr) bool {
	var wrap_arg_pmesh unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_pmesh = (unsafe.Pointer)(pmesh)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duDumpPolyMeshToObj(wrap_arg_pmesh, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}

/*
void duLogBuildTimes(rcContext& ctx, int totalTileUsec)
*/
func DuLogBuildTimes(ctx RcContextPtr, totalTileUsec int32) {
	var wrap_arg_ctx unsafe.Pointer
	var wrap_arg_totalTileUsec C.int
	wrap_arg_ctx = (unsafe.Pointer)(ctx)
	wrap_arg_totalTileUsec = (C.int)(totalTileUsec)
	C.nav_duLogBuildTimes(wrap_arg_ctx, wrap_arg_totalTileUsec)
}

/*
bool duReadCompactHeightfield(rcCompactHeightfield& chf, duFileIO * io)
*/
func DuReadCompactHeightfield(chf RcCompactHeightfieldPtr, io DuFileIOPtr) bool {
	var wrap_arg_chf unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_chf = (unsafe.Pointer)(chf)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duReadCompactHeightfield(wrap_arg_chf, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}

/*
bool duReadContourSet(rcContourSet& cset, duFileIO * io)
*/
func DuReadContourSet(cset RcContourSetPtr, io DuFileIOPtr) bool {
	var wrap_arg_cset unsafe.Pointer
	var wrap_arg_io unsafe.Pointer
	wrap_arg_cset = (unsafe.Pointer)(cset)
	wrap_arg_io = (unsafe.Pointer)(io)
	wrap_out := C.nav_duReadContourSet(wrap_arg_cset, wrap_arg_io)
	go_out := bool(wrap_out)
	return go_out
}
